# See http://search.cpan.org/~jesse/Jifty/lib/Jifty/Manual/AccessControl.pod

use strict; use warnings;

package CCNCore::CurrentUser;

use base qw(Jifty::CurrentUser);

__PACKAGE__->mk_accessors(qw(web_group));

sub _init {
    my $self = shift;
    my %args = (@_);

    if (keys %args) {
        $self->user_object(CCNCore::Model::User->new(current_user => $self));
        $self->user_object->load_by_cols(%args);

        # if ( $self->user_object->web_group == 1 ) {
        #     $self->is_superuser(1);
        # };

        $self->web_group($self->user_object->web_group);
    };
    $self->SUPER::_init(%args);
};
 
1;